from PyPDF3 import PdfFileReader
reader=PdfFileReader('test.pdf')
info=reader.getDocumentInfo()
print(info)
layout=reader.getPageLayout()
print(layout)
mode=reader.getPageMode()
print(mode)
xmp=reader.getXmpMetadata()
print(xmp)
pages=reader.getNumPages()
for index in range(pages):
    page=reader.getPage(index)
    number=reader.getPageNumber(page)
    text = page.extractText()
    print(page,number,type(page),'\n',text)
